<?php
    $resume =  $this->requestAction(array('controller'=>'resumes','action'=>'get_data'));
    $complete_personal = $this->requestAction(array('controller'=>'jobseekers','action'=>'complete_personal'));

    if($resume['Resume']['academic_id']!=0)
    { $complete_summary = true; }
    else
    { $complete_summary = false; }

    if( $complete_summary && $complete_personal)
    { $complete = true; }
    else
    { $complete = false; }
    
    if($resume['Resume']['upload_file']!='')
    { $attachment = true; }
    else
    { $attachment = false; }

    if($resume['Resume']['open']==1)
    { $open = true; }
    else
    { $open = false; }
    
   

    $menu['1']['text'] = "Lihat Resume Saya";
    $menu['1']['controller'] = "jobseekers";
    $menu['1']['action'] = "view_resume";
                                  
    if($complete_personal)
    { $menu['2']['text'] = "Data Diri <font color='#7EF72A' style='font-size:80%'><b>OK</b></font>"; }
    else
    { $menu['2']['text'] = "Data Diri <font color='red' style='font-size:80%'><b>X</b></font>"; } 
    $menu['2']['controller'] = "jobseekers";
    $menu['2']['action'] = "personal_detail";
    if($complete_summary)
    { $menu['3']['text'] = "Ringkasan <font color='#7EF72A' style='font-size:80%'><b>OK</b></font>"; }
    else
    { $menu['3']['text'] = "Summary <font color='red' style='font-size:80%'><b>X</b></font>"; }
    $menu['3']['controller'] = "resumes";
    $menu['3']['action'] = "summary";
    
    if($open)
    { $menu['4']['text'] = "Exposure Level <font color='#7EF72A' style='font-size:80%'><b>OPEN</b></font>";  }
    else
    { $menu['4']['text'] = "Exposure Level <font color='red' style='font-size:80%'><b>HIDE</b></font>";  }
    $menu['4']['controller'] = "resumes";
    $menu['4']['action'] = "searchable";
     if($attachment)
    { $menu['5']['text'] = "Lampiran Resume <font color='#7EF72A' style='font-size:80%'><b>UPLOADED</b></font>";  }
    else
    { $menu['5']['text'] = "Attachment Resume <font color='red' style='font-size:80%'><b>EMPTY</b></font>";  }   
    $menu['5']['controller'] = "resumes";
    $menu['5']['action'] = "attachment";
    $menu['6']['text'] = "Foto";
    $menu['6']['controller'] = "resumes";
    $menu['6']['action'] = "photo";

    $menu['7']['text'] = "Pendidikan";
    $menu['7']['controller'] = "educations";
    $menu['7']['action'] = "index";
    $menu['8']['text'] = "Pengalaman Kerja";
    $menu['8']['controller'] = "works";
    $menu['8']['action'] = "index";
    // $menu['9']['text'] = "Top Skills";
    // $menu['9']['controller'] = "skills";
    // $menu['9']['action'] = "index";
    $menu['9']['text'] = "Bahasa";
    $menu['9']['controller'] = "languages";
    $menu['9']['action'] = "index";
    $menu['10']['text'] = "Informasi Tambahan";
    $menu['10']['controller'] = "resumes";
    $menu['10']['action'] = "additional";

    
    
    echo "<div id='menu_resume'>";

    for ($i=1;$i<=10;$i++)
    {
        if($i==1)
        { echo "<span class='section'>Resume Saya</span><br>"; }
        if($i==2)                                                                              
        { echo "<br><span class='section'>Bagian Kebutuhan</span><br>"; }
        if($i==5)
        { echo "<br><span class='section'>Bagian Upload</span><br>"; }
        if($i==7)
        { echo "<br><span class='section'>Bagian Pilihan</span><br>"; }
        
        if($menu_resume==$i)
        { 
            //echo "<a class='click' href='../".$menu[$i]['controller']."/".$menu[$i]['action']."'>".$menu[$i]['text']."</a>";
            echo $html->link($menu[$i]['text'],array('controller'=>$menu[$i]['controller'],'action'=>$menu[$i]['action']),array('class'=>'click'),false,false); 
        
        }
        else
        { 
            //echo "<a href='../".$menu[$i]['controller']."/".$menu[$i]['action']."'>".$menu[$i]['text']."</a>";
            echo $html->link($menu[$i]['text'],array('controller'=>$menu[$i]['controller'],'action'=>$menu[$i]['action']),array(),false,false); 
        }
    
    }
    
    
    echo "</div>";
 ?>